<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>Insert title here</title>
<link rel="stylesheet"
	href="<c:url value="/statics/os/css/cart.css"/>">
	
<link rel="stylesheet"
	href="<c:url value="/statics/icheck/flat/orange.css"/>">
	<link rel="stylesheet"
	href="<c:url value="/statics/bootstrap-3.3.0/css/bootstrap.css"/>">
<link rel="stylesheet"
	href="<c:url value="/statics/jquery-ui-1.12.1/jquery-ui.css"/>">
<link rel="stylesheet"
	href="<c:url value="/statics/jquery-ui-1.12.1/jquery-ui.theme.css"/>">
<link rel="stylesheet" href="<c:url value="/statics/css/style.css"/>">
<script src="<c:url value="/statics/jquery-1.12.4/jquery-1.12.4.js"/>"></script>

</head>
<body>
	<div>
		<jsp:include page="header.jsp" />
	</div>
<!-- 我的购物车begin -->
<div class="page-main">
  <div class="container-fluid">
    <div class="catbox hide" id="J_cartBox">
      <table id="cartTable" >
        <thead>
          <tr>
            <th>选择商品</th>
            <th>商品编号</th>
            <th>商品名称</th>
            <th>商品详情</th>
            <th>商品单价</th>
            <th>商品数量</th>
            <th>共计</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          <c:forEach items="${sessionScope.cart.items}" var="item">
            <tr data-sid="${shoppingCart.productSpecNumber}">
            <!--  选择商品-->
              <td class="checkbox"><input data-initial="true" data-sid="${item.id}" data-check-status="1" class="check-one check" type="checkbox"/></td>
              <td>${item.id}</td>
              <td>${item.good.name}</td>
              <!-- 商品详情 -->
              <td class="goods">
              <a target="_blank" href="/secondshop/goods/goodInfo?goodId=${item.good.id}">
				<img src="<c:url value="${item.good.photoUrl}"/> "  width="300px">
			  </a>
               <a href="${ctx}/detail/${shoppingCart.productNumber}" target="_blank"><span>${shoppingCart.name}
                
                </span></a></td>
                <!--商品单价  -->
              <td class="price">${item.good.prise}</td>
              <td class="count"><div class="change-goods-num clearfix J_changeGoodsNum"> 
              <a href="javascript:void(0)" class="reduce">-</a>
                  <input class="count-input goods-num J_goodsNum" type="text" value="${item.number}" readonly/>
               <a href="javascript:void(0)" class="add">+</a> </div></td>
               <!--共计  -->
              <td class="subtotal">${item.sumMoney}</td>
              <td class="operation"><div class="col-action"><a href="/secondshop/goods/removeItem?id=${item.good.id}" title="删除" class="del J_delGoods"  data-sid="${item.id}" ><i class="glyphicon glyphicon-remove"></i></a> </div></td>
            </tr>
          </c:forEach>
        </tbody>
      </table>
      
      <span>共计${cart.totalMoney} </span><a href="<c:url value="/uc/user/address/checkout" />">去结算</a>
      <div class="cart-bar clearfix" id="J_cartBar" style="display:none;">
        <div class="section-left" > <a href="${ctx}/list?categoryId=1">继续购物</a>
	<span class="cart-total">共 <i id="J_cartTotalNum"></i> 件商品，已选择 <i id="J_selTotalNum"></i> 件</span></div>
		
        <span class="total-price" style="display"> 合计（不含运费）：<em id="J_cartTotalPrice"></em>元 </span> 
        <a href="<c:url value="/address/checkout" />">去结算</a>
        <div class="no-select-tip hide" id="J_noSelectTip"> 请勾选需要结算的商品 <i class="arrow arrow-a"></i> <i class="arrow arrow-b"></i> </div>
      </div>
      

    </div>
  <div class="cart-empty hide" id="J_cartEmpty">
            <h2>您的购物车还是空的！</h2>
            <p class="login-desc">登录后将显示您之前加入的商品</p>
            <a href="#" class="btn btn-primary btn-login" id="J_loginBtn">立即登录</a>
            <a href="${ctx}/list?categoryId=1" class="btn btn-primary btn-shoping J_goShoping">马上去购物</a>
        </div>
  </div>
</div>

<!-- 我的购物车end -->

<jsp:include page="footer.jsp" />


	<script src="<c:url value="/statics/jquery-1.12.4/jquery-1.12.4.js"/>"></script>
	<script src="<c:url value="/statics/bootstrap-3.3.0/js/bootstrap.js"/>"></script>
	<script src="<c:url value="/statics/jquery-ui-1.12.1/jquery-ui.js"/>"></script>
	<script
		src="<c:url value="/statics/jquery-ui-1.12.1/datepicker-zh-CN.js"/>"></script>

<myfooter>
  <script src="<c:url value="/statics/jquery/jquery-2.1.4.min.js"/>"></script>
  <script src="<c:url value="/statics/os/js/zySearch.js"/>"></script>
  <!-- iCheck --> 
  <script src="<c:url value="/statics/icheck/icheck.min.js"/>"></script>
  <!-- layer javascript --> 
<script src="<c:url value="/statics/layer/layer.js"/>"></script>
<script src="<c:url value="/statics/os/js/cart.js"/>"></script>
</myfooter>

</body>
</html>